home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
aie8911.zip
/
LISTING.3
< prev
next >
Wrap
Text File
|
1989-08-27
|
774b
|
33 lines
Listing 3
THE STUB INTERPRETER
% stub execution when stub is a boolean decision
do_stub( Stub ) :-
% does the stub describe a boolean decision
is_a_boolean( Stub),
!,
% then ask the user a boolean question
% generated from the stub
yes( question_prompt( Stub) ,
q_means_no,
do_quit ) .
% stub execution when stub is a loop
do_stub( Stub ) :-
is_a_loop( Stub),
!,
do_a_loop( Stub).
% stub execution when stub is an action
do_stub( Stub ) :-
display_purpose( Stub),
!.
---------------- end of listing -----------------------------------